import fetch from './axios'

// 获取验证码
export const getCode = data => fetch('/validatecode/getcode', data, 'get', 'blob')

// 站点
export const siteSwitcher = data => fetch('/site/getswitcherlist', data)
export const siteList = data => fetch('/site/getlist', data)
export const siteSave = data => fetch('/site/save', data)
export const siteModify = data => fetch('/site/modify', data)
export const siteSort = data => fetch('/site/sort', data)
export const siteRemove = data => fetch('/site/remove', data)
export const siteGet = data => fetch('/universal/get', data)
export const siteSet = data => fetch('/universal/modify', data)

// 角色
export const roleList = data => fetch('/authrole/getlist', data)
export const roleSave = data => fetch('/authrole/save', data)
export const roleModify = data => fetch('/authrole/modify', data)
export const roleRemove = data => fetch('/authrole/remove', data)
export const roleUserList = data => fetch('/user/role/getlist', data)
export const roleSetUser = data => fetch('/user/addusertorole', data)
export const roleFuncList = data => fetch('/authrole/getfunction', data)
export const roleSetFunc = data => fetch('/authrole/setfunction', data)
export const roleFuncLists = data => fetch('/authrole/getfunctions', data)

// 用户
export const userList = data => fetch('/user/getlist', data)
export const userSave = data => fetch('/user/save', data)
export const userModify = data => fetch('/user/modify', data)
export const userRemove = data => fetch('/user/remove', data)
export const userSiteList = data => fetch('/user/getsite', data)
export const userSetSite = data => fetch('/user/setsite', data)
export const userModifyPassword = data => fetch('/user/modifypassword', data)

// 功能库
export const funcLibList = data => fetch('/functionlibrary/getlisttree', data)
export const funcLibListOk = data => fetch('/functionlibrary/getshowlisttree', data)
export const funcLibRemove = data => fetch('/functionlibrary/remove', data)
export const funcLibSave = data => fetch('/functionlibrary/save', data)
export const funcLibModify = data => fetch('/functionlibrary/modify', data)
export const funcLibOrder = data => fetch('/functionlibrary/modifyOrderIds', data)

// 功能
export const funcList = data => fetch('/function/getlist', data)
export const funcRemove = data => fetch('/function/remove', data)
export const funcSave = data => fetch('/function/save', data)
export const funcModify = data => fetch('/function/modify', data)
export const funcOrder = data => fetch('/function/modifyOrderIds', data)

// 分类
export const cateList = data => fetch('/column/getlisttree', data)
export const cateTree = data => fetch('/column/getshowlisttree', data)
export const cateRemove = data => fetch('/column/remove', data)
export const cateSave = data => fetch('/column/save', data, 'json')
export const cateModify = data => fetch('/column/modify', data, 'json')
export const cateOrder = data => fetch('/column/modifysortnum', data)

// 文章
export const artList = data => fetch('/article/getlist', data)
export const artRemove = data => fetch('/article/remove', data)
export const artDelete = data => fetch('/article/delete', data)
export const artRecover = data => fetch('/article/articlerecover', data)
export const artSave = data => fetch('/article/save', data, 'json')
export const artModify = data => fetch('/article/modify', data, 'json')
export const artStick = data => fetch('/article/stick', data)
export const artUpdate = data => fetch('/article/update', data)
export const artGetById = data => fetch('/article/get', data)

// 文章导入
export const artExcelIn = data => fetch('/article/uploadArticleByExcel', data, 'upload')
export const artImgIn = data => fetch('/article/zipUploadArticleImg', data, 'upload')

// 文章推送到百度
export const artBaiduPush = data => fetch('/baidu/urlpush', data)

// 推荐产品
export const productRecommendList = data => fetch('/productRecommend/getlist', data)
export const productRecommendSave = data => fetch('/productRecommend/save', data)
export const productRecommendModify = data => fetch('/productRecommend/modify', data)
export const productRecommendSort = data => fetch('/productRecommend/modifysortnum', data)
export const productRecommendRemove = data => fetch('/productRecommend/remove', data)

// 标签分类
export const tagsCateList = data => fetch('/tagsclassify/getlist', data)
export const tagsCateSelect = data => fetch('/tagsclassify/getdownlist', data)
export const tagsCateSave = data => fetch('/tagsclassify/save', data)
export const tagsCateModify = data => fetch('/tagsclassify/modify', data)
export const tagsCateRemove = data => fetch('/tagsclassify/remove', data)

// 标签
export const tagsList = data => fetch('/tags/getlist', data)
export const tagsSave = data => fetch('/tags/save', data)
export const tagsModify = data => fetch('/tags/modify', data)
export const tagsRemove = data => fetch('/tags/remove', data)

// 公告
export const noticeList = data => fetch('/notice/getlist', data)
export const noticeSave = data => fetch('/notice/save', data)
export const noticeModify = data => fetch('/notice/modify', data)
export const noticeRemove = data => fetch('/notice/remove', data)

// 友情链接
export const linkList = data => fetch('/friendlink/getlist', data)
export const linkSave = data => fetch('/friendlink/save', data)
export const linkModify = data => fetch('/friendlink/modify', data)
export const linkRemove = data => fetch('/friendlink/remove', data)

// 公司
export const companyList = data => fetch('/company/getlist', data)
export const companySave = data => fetch('/company/save', data)
export const companyModify = data => fetch('/company/modify', data)
export const companyRemove = data => fetch('/company/remove', data)
export const companyGetById = data => fetch('/company/get', data)

// 频道
export const channelList = data => fetch('/channel/getlist', data)
export const channelSave = data => fetch('/channel/save', data)
export const channelModify = data => fetch('/channel/modify', data)
export const channelRemove = data => fetch('/channel/remove', data)

// 单页
export const pageList = data => fetch('/leaflet/getlist', data)
export const pageSave = data => fetch('/leaflet/save', data)
export const pageModify = data => fetch('/leaflet/modify', data)
export const pageRemove = data => fetch('/leaflet/remove', data)
export const pageGetById = data => fetch('/leaflet/get', data)

// 登录
export const loginByUsername = data => fetch('/login', data)
export const logout = data => fetch('/user/setsite', data)
export const getUserInfo = data => fetch('/user/info', data)

// 获取菜单
export const userMenu = data => fetch('/index', data)

// 模板
export const templetTree = data => fetch('/templet/getTree', data)
export const templetList = data => fetch('/templet/getTempletTree', data)
export const templetRemove = data => fetch('/templet/remove', data)
export const templetSave = data => fetch('/templet/saveContent', data)
export const templetModify = data => fetch('/templet/modify', data)
export const templetGetById = data => fetch('/templet/get', data)

// 导入导出
export const templetToZip = data => fetch('/templet/download', data, 'post', 'blob')
export const templetInZip = data => fetch('/templet/zipUpload', data, 'upload')
export const ResourcesToZip = data => fetch('/resources/downloadResources', data, 'post', 'blob')
export const ResourcesInZip = data => fetch('/resources/zipUpload', data, 'upload')
export const artToExcel = data => fetch('/article/exported/excel', data, 'post', 'blob')

// 模板可视化
export const templetLook = data => fetch('/visualization/resolve', data, 'post', 'text')
export const templetLookSave = data => fetch('/visualization/replace', data)

// 资源
export const resourcesList = data => fetch('/resources/getResourcesTree', data)
export const resourcesRemove = data => fetch('/resources/remove', data)
export const resourcesSave = data => fetch('/resources/saveResources', data)
export const resourcesModify = data => fetch('/resources/modify', data)
export const resourcesGetById = data => fetch('/resources/get', data)

// 模板标签
export const tplLabelList = data => fetch('/label/getLabelList', data)
export const tplLabelRemove = data => fetch('/label/delete', data)
export const tplLabelSave = data => fetch('/label/save', data, 'json')
export const tplLabelModify = data => fetch('/label/modify', data, 'json')

// 导航栏
export const navList = data => fetch('/navigation/getlist', data)
export const navRemove = data => fetch('/navigation/remove', data)
export const navSave = data => fetch('/navigation/save', data)
export const navModify = data => fetch('/navigation/modify', data)
export const navOrder = data => fetch('/navigation/modifyOrderIds', data)

// 生成静态
export const createHtmlBySite = data => fetch('/createFreeMaker/create', data)
export const createHtmlByColumn = data => fetch('/create/columnFreeMaker', data)
export const createHtmlByArt = data => fetch('/create/articleFreeMaker', data)
export const createHtmlByChannel = data => fetch('/analyze/createChannelPages', data)
export const createHtmlByTags = data => fetch('/create/tagArticleFreeMaker', data)
export const createHtmlByPage = data => fetch('/createLeafletPages/create', data)

// 定时任务
export const scheduleList = data => fetch('/schedule/list', data)
export const scheduleRemove = data => fetch('/schedule/remove', data)
export const scheduleSave = data => fetch('/schedule/save', data)
export const scheduleModify = data => fetch('/schedule/update', data)

// 静态网址规则
export const urlRuleList = data => fetch('/website/getpages', data)
export const urlRuleRemove = data => fetch('/website/remove', data)
export const urlRuleSave = data => fetch('/website/save', data)
export const urlRuleModify = data => fetch('/website/modify', data)

// 生成规则
export const urlsRuleList = data => fetch('/url/getList', data)
export const urlsRuleModify = data => fetch('/url/modify', data)

// 查看静态网址
export const urlLookList = data => fetch('/manuscript/searchManuscript', data)
export const urlLookRemove = data => fetch('/manuscript/delete', data)
export const urlLookModify = data => fetch('/manuscript/modify', data)

/**
 * ============用户中心user-center===============
 */
// 用户管理
export const getucUserList = data => fetch('/userManagement/getList', data)
export const getucUserDetail = data => fetch('/userManagement/getUser', data)
export const modifyucUserStatus = data => fetch('/userManagement/modifyUserStatus', data)
export const modifyucUser = data => fetch('/userManagement/modifyUser', data)

// 用户反馈管理
export const userFeedbackList = data => fetch('/userFeedback/getList', data)

// 消息中心
export const adducSystemMessage = data => fetch('/systemMessageSend/sendMessageToAll', data)
export const getucSystemMessage = data => fetch('/systemMessageSend/getList', data)
export const getucSystemMessageDetail = data => fetch('/systemMessageSend/getSystemMessageSendInfo', data)
export const removeucSystemMessage = data => fetch('/systemMessageSend/deleteSendMessage', data)

// 导航栏管理
export const adducNavigates = data => fetch('/navigates/save', data)
export const getucNavigatesList = data => fetch('/navigates/select', data)
export const modifyucNavigatesMove = data => fetch('/navigates/move', data)
export const removeucNavigates = data => fetch('/navigates/delete', data)
export const modifyucNavigates = data => fetch('/navigates/modify', data)

// 合作信息
export const getucCooperation = data => fetch('/sysCooperation/getSysCooperation', data)
export const modifyucCooperation = data => fetch('/sysCooperation/addCooperation', data, 'json')

// 默认头像
export const adducAvatar = data => fetch('/defaultAvatar/save', data)
export const getucAvatar = data => fetch('/defaultAvatar/getList', data)
export const removeucAvatar = data => fetch('/defaultAvatar/delete', data)

// 标签领域管理
export const getucFieldTage = data => fetch('/fieldTag/getList', data)
export const adducFieldTage = data => fetch('/fieldTag/save', data)
export const removeucFieldTage = data => fetch('/fieldTag/delete', data)
export const modifyucFieldTage = data => fetch('/fieldTag/update', data)

// 专家审核
export const getucAuditExpertList = data => fetch('/auditExpert/getList', data)
export const getucAuditExpertRecord = data => fetch('/auditExpert/getAuditList', data)
export const modifyucAuditExpert = data => fetch('/auditExpert/auditExpert', data)

// 理投师举报信息管理
export const ltsTipList = data => fetch('/lts/tip/getList', data)
export const ltsTipRemove = data => fetch('/lts/tip/remove', data)
export const modifyTipStatus = data => fetch('/lts/tip/modify', data)

// 理投师导航栏管理
export const ltsNavList = data => fetch('/lts/navigation/getlist', data)
export const ltsNavRemove = data => fetch('/lts/navigation/remove', data)
export const ltsNavSort = data => fetch('/lts/navigation/resort', data)
export const ltsNavSave = data => fetch('/lts/navigation/save', data)
export const ltsNavModify = data => fetch('/lts/navigation/modify', data)

// 理投师分类管理
export const ltsCateList = data => fetch('/lts/classify/getlist', data)
export const ltsCateRemove = data => fetch('/lts/classify/remove', data)
export const ltsCateSort = data => fetch('/lts/classify/resort', data)
export const ltsCateSave = data => fetch('/lts/classify/save', data)
export const ltsCateModify = data => fetch('/lts/classify/modify', data)

// 理投师稿件管理
export const ltsGdList = data => fetch('/lts/viewPoint/getlist', data)
export const ltsGdRemove = data => fetch('/lts/viewPoint/remove', data)
export const ltsGdSave = data => fetch('/lts/viewPoint/save', data)
export const ltsGdModify = data => fetch('/lts/viewPoint/modify', data)
export const ltsGdStick = data => fetch('/lts/viewPoint/stick', data)

// 用户中心专家
export const auditExpertList = data => fetch('/auditExpert/getList', data)
export const auditRecordList = data => fetch('/auditExpert/getAuditList', data)
export const auditExpertModify = data => fetch('/auditExpert/modify', data, 'json')

// 用户中心机构
export const auditOrgsList = data => fetch('/auditOrgs/getList', data)
export const auditOrgsRecordList = data => fetch('/auditOrgs/getAuditList', data)
export const auditOrgsModify = data => fetch('/auditOrgs/modify', data, 'json')

//用户评论
export const getCommentList = data => fetch('/lts/comment/getCommentList', data)
export const commentRecycle = data => fetch('/lts/comment/addCommentRecycle', data)
export const commentRemove = data => fetch('/lts/comment/removeCommentRecycle', data)
export const commentRecover = data => fetch('/lts/comment/updateCommentRecycle', data)
export const getCommentRecycleList = data => fetch('/lts/comment/getCommentRecycleList', data)

export const getCommentBlackList = data => fetch('/commentBlacklist/getList', data)
export const commentBlackRemove = data => fetch('/commentBlacklist/remove', data)
export const commentBlackAdd = data => fetch('/commentBlacklist/save', data)

// 错误日志
export const sysLog = data => fetch('/article/getArticleExcelMsg', data)

// 机构审核
export const getucAuditOrgsList = data => fetch('/auditOrgs/getList', data)
export const getucAuditOrgsRecord = data => fetch('/auditOrgs/getAuditList', data)
export const modifyucAuditOrgs = data => fetch('/auditOrgs/auditOrgs', data)

// 直播间管理
export const getZBroomList = data => fetch('/webcastrooms/page', data)
export const tjZB = data => fetch('/webcastrooms', data, 'put')

// 直播间主题管理
export const getZBtopicList = data => fetch('/webcasttopics/page', data)
export const tjZBtopic = data => fetch('/webcasttopics', data, 'put')
export const modifyStatus = data => fetch('/webcastrooms/updateStatus', data, 'json')

// 粉丝管理
export const getZBfansList = data => fetch('/webcastusers/page', data)
export const tjZBfans = data => fetch('/webcastusers', data, 'put')
// 直播间消息管理
export const getZBmsgList = data => fetch('/messagechats/page', data)
export const delZBmsg = data => fetch('/messagechats', data, 'delete')

// 开户管理
export const getZBkaihuList = data => fetch('/lts/tools/open/getlist', data)
export const delZBkaihu = data => fetch('/lts/tools/open/remove', data)
export const editZBkaihu = data => fetch('/lts/tools/open/modify', data)

// 理投师轮播图
export const ltsBanner = data => fetch('/movePicture/page', data, 'get')
export const ltsBannerAdd = data => fetch('/movePicture', data, "json")
export const ltsBannerEdit = data => fetch('/movePicture/modify', data, "json")
export const ltsBannerOrder = data => fetch('/movePicture/resort', data)
export const ltsBannerDel = data => fetch('/movePicture/remove', data)
// 提现记录
export const getLtsWithdrawal = data => fetch('/withdrawal/page', data, 'get')
export const updateLtsWithdrawal = data => fetch('/withdrawal/audit', data, 'put')

// 用户认证审核
export const getLtsAuditCert = data => fetch('/auditCert/getList', data)
export const getLtsAuditCertHistory = data => fetch('/auditCert/getAuditList', data)
export const setLtsAuditCert = data => fetch('/auditCert/modify', data, "json")

// 问答管理
export const ltsQaList = data => fetch('/lts/question/getListPage', data)
export const ltsQaDetail = data => fetch('/lts/question/details', data) // 参数 questionId
export const ltsQaUpdateStatus = data => fetch('/lts/question/updateStatus', data, 'json') // 审核 参数 questionId  status
export const ltsQaDelete = data => fetch('/lts/question/del', data) // 删除 参数 questionId
export const ltsQaRecover = data => fetch('/lts/question/recure', data) // 恢复 参数 questionId

// 计划管理
export const getLtsPlanList = data => fetch('/lts/planRecommend/getList', data)
export const modifyLtsPlanStatus = data => fetch('/lts/planRecommend/updateStatus', data, 'json')
export const modifyLtsPlanType = data => fetch('/lts/planRecommend/recommend', data, 'json')

// 计划文章列表
export const getLtsPlanArt = data => fetch('/lts/planArticle/getPageList', data)
export const removePlanArtDelete = data => fetch('/lts/planArticle/remove', data) 
// 计划订单列表
export const getLtsPlanOrder = data => fetch('/lts/planOrder/getPgeList', data)
// 通知消息
export const getLtsMessage = data => fetch('/lts/news/getNewsNoticeList', data)
export const getLtsMessageByNameOrPhone = data => fetch('/lts/news/getUserByNameOrPhone', data)
export const getLtsMessageUser = data => fetch('/lts/news/getUserListByNewsNotice', data)
export const addLtsMessage = data => fetch('/lts/news/saveSysNotice', data, 'json')
export const removeLtsMessage = data => fetch('/lts/news/delSysNewsNotice', data)
// 签到明细
export const getLtsCheckIn = data => fetch('/userreportdetailss/page', data)
// 活动管理
export const getLtsActivity = data => fetch('/eventfunctions/page', data)
export const updateLtsActivity = data => fetch('/eventfunctions/modify', data, 'json')
// 首页统计
export const getDashboardChart = data => fetch('/lts/datacount/dataCountByType', data, 'json')
export const getDashboard = data => fetch('/lts/datacount/dataCountSumByTime', data)
